package com.itheima.health.dao;

import com.itheima.health.vo.MobileSubmitSetMealVO;
import com.itheima.health.vo.OrderVO;
import org.apache.ibatis.annotations.*;

import java.util.Date;

/**
 * @author zhangmeng
 * @description 套餐DAO
 * @date 2019/9/26
 **/
@Mapper
public interface MobileCommonDao {
    @Select("select count(*) from itcast_health.t_order " +
            "where member_id =#{memberId} and orderDate=#{orderDate}")
    Integer getOrderByMemberIdAndData(@Param("memberId") Integer memberId,@Param("orderDate") Date orderDate);
    @Update("update itcast_health.t_ordersetting set reservations = reservations+1 " +
            "where orderDate=#{orderDate};")
    void addReservationsByorderDate(Date orderDate);



    void insetOrder(MobileSubmitSetMealVO mobileSubmitSetMealVO);
    @Select("select * from itcast_health.t_order where id=#{id}")
    OrderVO getOrderByid(Integer id);
}
